package com.warrior.gatherweb.controller;

import com.warrior.gatherweb.service.GatherEnumService;
import com.warrior.gatherweb.vo.PMetricVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName com.warrior.gatherweb.controller.GatherEnumController.java
 * @Author xujian
 * @Description
 * @CreateTime 2021年01月04日 17:26:00
 */
@RestController
@RequestMapping("enum")
@Api(tags = "采集项枚举列表接口")
public class GatherEnumController {

    @Autowired
    private GatherEnumService gatherEnumService;

    @GetMapping
    public CommonResult getGatherEnum(String pName){
        Map<String, PMetricVo> result = gatherEnumService.getPMetricVos(pName);
        return CommonResponse.success(result);
    }


}
